package chapter_seventeen.text240;

/**
 * Data time:2021/11/8 15:25
 * StudentID:2019112118
 * Author:hgw
 * Description: 功能键类
 */
public class FunctionButton {
    private Command command;    //维持一个抽象命令对象的引用

    //为功能键注入命令

    public void setCommand(Command command) {
        this.command = command;
    }

    //发送请求的方法
    public void click() {
        System.out.println("单击功能键");
        command.execute();
    }
}
